<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>技术论坛系统</title>
    <link href="/css/bootstrap.css" rel="stylesheet">
    <link href="/css/style.css" rel="stylesheet">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
</head>
<body style="background-color: #fafafa">
<script type="text/javascript" src="/js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="/js/bootstrap.js"></script>
<script type="text/javascript" src="/js/bootstrap-paginator.js"></script>



<nav class="navbar navbar-inverse">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="row">
            <div class="col-md-10 col-md-offset-2">



        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li style="font-size: 20px;"><a href="${pageContext.request.contextPath}/api/type/">首页</a></li>
            </ul>
            <c:forEach items="${types.tags}" var="tag">
            <ul class="nav navbar-nav" style="margin-left: 30px">
                <li class="dropdown">

                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">${tag.tagsName} <span class="caret"></span></a>

                            <ul class="dropdown-menu">
                            <c:forEach items="${tag.typeSends}" var="type">
                                <li><a href="${pageContext.request.contextPath}/api/note/index?typeid=${type.typeId}">${type.typeName}</a></li>
                            </c:forEach>
                            </ul>


                </li>
            </ul>
            </c:forEach>
            <ul class="nav navbar-nav" style="margin-left: 20px;">
                <c:if test="${user!=null}">
                    <li class="dropdown">

                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">${user.nickname} <span class="caret"></span></a>

                        <ul class="dropdown-menu">

                                <li><a href="${pageContext.request.contextPath}/api/note/note/createby?createby=${user.userid}">个人中心</a></li>
                                <li><a href="${pageContext.request.contextPath}/updateInfo.jsp">修改资料</a></li>

                        </ul>


                    </li>
                </c:if>
                <c:if test="${user==null}">
                <li><a href="${pageContext.request.contextPath}/login.jsp">登录</a></li>
                </c:if>
            </ul>



        </div><!-- /.navbar-collapse -->




            </div>
        </div>
    </div><!-- /.container-fluid -->
</nav>

